package practice_0526;

public class test01 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Threable_ threable = new Threable_(dog);
        threable.start();
    }
}

class Threable_ implements Runnable{

    @Override
    public void run() {
        task.run();
    }
    public void start(){
        run();
    }
    private Runnable task;

    public Threable_(Runnable task) {
        this.task = task;
    }
}

class Dog implements Runnable{

    @Override
    public void run() {
        System.out.println("小狗汪汪叫......");
    }
}
